<?php

namespace App\Http\Requests\Admin\Store;

use App\Http\Requests\ApiRequest;
use App\Models\Panx\ProductUrlType;
use App\Services\Utils\Guard;
use Illuminate\Database\Query\Builder;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\UploadedFile;
use Illuminate\Validation\Rule;

/**
 * @property string $is_sale
 * @property string $priority
 * @property string $product_id
 */
class StorePivotCustomerProductUpdate extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {

        $rules = [
            'is_sale'    => 'sometimes|required|int|in:0,1',
            'priority'   => 'sometimes|required|int|between:0,10000',
            'product_id' => 'required|int|min:0',
        ];

        return $rules;
    }


}
